tapaio check return value from read()
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 27 Dec 2007 12:28:58 +0000 (12:28 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 27 Dec 2007 12:28:58 +0000 (12:28 +0000)
commitfa7a56b7fa6b5c3eab8d08e605937b58e03cd1ac
treeed1e402eabbb767a93c7aafad3711b471a8e1adc
parent819571016f4c308fadd16fb9a893441ac8d077b6
tapaio check return value from read()

In tools/blktap/drivers/tapaio.c there is a call to read(2) whose
return value is not checked.  The attached patch attempts to do
something vaguely sensible in cases of error.

Fully comprehensive error handling in this area would be quite tough
to introduce now but at least with this change when things go wrong
you stand a chance of getting some information about what happened.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/blktap/drivers/tapaio.c